Motion vector detection with local motion estimator

ABSTRACT

A method and apparatus of encoding digital video, for example according to the ISO/IEC MPEG standards (ISO/IEC 11172-2 MPEG-1 and ISO/IEC 13818-2 MPEG-2), which employs a local motion estimator for determining respective local motion vectors for groups of adjacent macroblocks in a picture. A local motion vector is determined for each row of macroblocks in a picture from the motion vectors of the macroblocks in that row. Then, for macroblocks in the corresponding row of a subsequently coded picture, the local motion vector can be used to select the search window used for determining the motion vectors. The local motion estimator improves search range and accuracy of macroblock motion vector detection without increasing the search window accessing bandwidth and caching requirement, and computation lode of searching.

FIELD OF THE INVENTION

The present invention relates to a method and apparatus for encodingmoving pictures sequences. In particular, the present invention relatesto a method and apparatus for motion estimation and motion compensationin a video signal compression system.

BACKGROUND OF THE INVENTION

Methods for encoding moving pictures or video such as the MPEG1, MPEG2,H.261, and H.263 standards had been developed for efficient transmissionand storage. A detailed description of one such encoding method is foundin MPEG2 Test Model 5, ISO/IEC JTC1/SC29/WG11/N0400, April 1993, and thedisclosure of that document is hereby expressly incorporated herein byreference. In the described encoding method, an input video sequence isorganized into a sequence layer, group-of-pictures (GOP), pictures,slices, macroblocks, and finally block layer. Each picture is codedaccording to its determined picture coding type. The picture codingtypes used include intra-coded picture (I-picture), predictive-codedpicture (P-picture), and bi-directionally predictive-coded picture(B-picture).

Motion estimation/compensation, transform coding, and statistical codingare utilized to efficiently compress the input video sequence. Forexample in MPEG2 Test Model 5, each picture from the input videosequence is partitioned into rows of smaller and non-overlappingmacroblocks of picture elements (pixels). Macroblocks in each row may begrouped into one or more slices. The compression is performed on eachmacroblock on a row-by-row basis starting from the leftmost macroblockto the rightmost macroblock, and the top row to the bottom row.

In the motion estimation/compensation method, motion vectors aredetected for each macroblock in a picture. The coding mode for amacroblock (e.g. intra-coded, forward-predicted, backward-predicted, orinterpolated) is decided based on the detected motion vectors and thedetermined picture coding type. The utilized motion vectors aredifferentially coded with variable length codes before outputting.

A typical motion vector detection process comprises determining, foreach macroblock to be coded, a search window consisting of pixels from areference picture and matching pixel vales of the macroblocks to blocksof pixel values obtained from the search window. This process is knownto be computationally intensive. Particularly, the size of the searchwindow has a direct impact to the computation load.

Many methods of matching the pixel blocks are available, such as anexhaustive, search method which compares every definable block withinthe search window, a logarithmic search method, a hierarchial search,and various other possible derivations. Depending on applicationrequirements, a search method may be selected based on its performancein terms of accuracy and computation complexity.

To cater for sequences with large object movements between pictures,methods exist to increase the search range without enlarging the searchwindow. These methods provide greater accuracy motion vectors forpicture sequences with large movements without a large increase incomputation load. One such method is the telescopic search method inwhich the motion vectors of macroblocks from a previously coded ormatched picture are used to generate a new search window for eachcurrent macroblock. The telescopic search method comprises the steps ofobtaining a motion vector from a co-sited macroblock from a closestcoded picture; optional scaling of the obtained motion vector accordingto the picture distances between the reference picture, the closestcoded picture, aid the current picture; and defining the search windowbased on the centre position of the current macroblock plus an offsetdefined by the scaled motion vector.

Alternate methods of determining search windows are disclosed in U.S.Pat. Nos. 5,473,379 and 5,657,087, for example. The methods disclosedtherein comprise the steps of calculating a global motion vector basedon the motion vectors of a previous picture, and offsetting searchwindows of all macroblocks by the calculated global motion vector. Theglobal motion vector may be determined by the mean or the mediafunction, or by the most common motion vector of the previous picture;it can be further normalized according to the picture distances. Thecalculated global motion vector may then represent a globaltranslational motion of objects from one picture to the other.

Apparatus implementing the motion estimator may include a search enginefor performing the comparison of the current macroblock pixels withcandidate pixel blocks from the search window. An example implementationof a suitable search engine is a systolic array processor whichcalculates and compares sum of absolute difference of the currentmacroblock with all candidate blocks. A search window cache is coupledwith the search engine to sustain the large input data bandwidthrequirement of the search engine. The search window cache is updated viaa DMA with the new search window for each macroblock from a slower butlarger frame memory where the reference picture is stored. Aprogrammable or fixed function controller with necessary RAM or ROM isused to determine the search windows, control DMA update of the cachewith the search window, as well as monitor the search engine forresulting motion vectors.

To minimize the bandwidth between the cache and frame memory, the searchwindow cache is designed to maximize the overlapping area of one searchwindow and the next. As a row of macroblocks is processed from the leftto right, only the rightmost part of the search window for eachmacroblock is loaded into the search window cache.

In some instances the amount of picture motion from one frame to anothercan be very large, particularly when the reference picture is two ormore frames separated in sequence from the object picture. However,increasing the size of the search window to better match the largeamount of motion would escalate the implementation complexity and powerconsumption.

The aforementioned telescopic search method expands the possible searchrange by redefining the search window location for each macroblock. Thismethod faces problems in picture regions with un-correlated motionwherein the search window has to be enlarged to account for theincorrectly defined search window location. In terms of implementation,the expanded possible search range increases the search window cachesize requirement and also the bandwidth requirement between the searchwindow cache and the frame memory. This is so because the search windowcache has to store data of all possible locations of search window forthe next macroblock.

Methods utilizing the global motion vector such as disclosed in U.S.Pat. Nos. 5,473,379 and 5,657,087 may be used to minimize the searchwindow cache size as well as the bandwidth requirement from the framememory while expanding the actual search range. These methods fix theoffset of the search window for all macroblocks in a picture. However,given that the only a single global motion vector is used to offset allof the macroblock search windows, the search range expansion works wellonly with pictures containing uniform translational motion. Pictureswith morning, rotational motion, and shearing effects, for example, arenot well dealt with using this technique.

Finally, all of the detected and utilized motion vectors aredifferentially coded with variable length codes (VLC) to reduce thecoding bit rate. Expanding the search range may produce larger motionvectors which require bigger VLC tables to be selected at the picturelevel to code the motion vectors. In turn, the bit rate for motionvector coding is increased.

SUMMARY OF THE INVENTION

In accordance with the present invention, there is provided a meth idfor determining motion vectors for encoding picture data in a sequenceof pictures wherein data representing a picture in the sequence isarranged in a plurality of adjacent data blocks, the method comprisingthe steps of:

-   -   (a) encoding a first picture in the sequence with motion vectors        for the data blocks in the first picture;    -   (b) generating respective local motion vectors for groups of        adjacent data blocks in the first picture, wherein a local        motion vector for each group of data blocks is generated        according to the individual motion vectors of the data blocks in        the group;    -   (c) selecting a data block of an object picture to be coded;    -   (d) determining a window of search data from a reference picture        on the basis of the corresponding position of the selected data        block and the local motion vector which corresponds to the        selected data block; and    -   (e) comparing the selected data block with the search data from        the reference picture in order to determine a motion vector for        the selected data block.

The present invention also provides a moving pictures encoder forencoding a sequence of pictures, including: a motion vector detectorcoupled to receive picture data from the sequence of pictures fordetermining respective motion vectors for data blocks in a picture ofthe picture sequence, wherein each motion vector is determined using acomparison of the data block with search window data from a referencepicture; a local motion estimator coupled to the motion vector detectorfor determining and storing a local motion vector based on motionvectors from a group of adjacent data blocks from a picture; and whereinthe motion vector detector utilises stored local motion vectors from apreviously coded picture to determine the search window data.

The present invention further provides a coding apparatus for encodingpicture data in a sequence of pictures wherein data representing apicture in the sequence is arranged in a plurality of adjacent datablocks and motion vectors are generated for the data blocks of a picturein the sequence, the coding apparatus including:

-   -   a local motion estimator for generating respective local motion        vectors for groups of adjacent data blocks in the object        picture, wherein a local motion vector for each group of data        blocks is generated according to individual motion vectors of        the data blocks in the group;    -   a local motion vector storage memory for storing the local        motion vectors for the object picture; and    -   a motion vector detector for generating motion vectors for data        blocks in an object picture, the motion vector detector        including a search window cache for caching a selected portion        of a reference picture and a search engine for comparing data        blocks of the object picture with the search window cache        contents, wherein the contents of the search window cache are        selected according to a local motion vector retrieved from the        local motion vector storage memory from a previously coded        picture in the picture sequence.

An embodiment of the present invention utilizes a local motion estimatorwhich determines a local motion vector for each row of macroblocks in apicture to be coded. The local motion estimator may determine the localmotion vectors based on detected motion vectors from the correspondingmacroblock rows of a previously processed or coded picture. Eachdetermined local motion vector provides an offset for search windows ofall macroblocks in a given row. The local motion vectors better adapt tomotion variations within a picture, and enable expansion of theeffective search range of the motion estimator without increasing thesearch window size.

In the preferred embodiment, each local motion vector defines a fixedoffset to all search windows within a macroblock row, and therefore theamounts of caching and cache updating remain constant from onemacroblock to the next within the row given that the search window sizeis also fixed. This is particularly advantageous because the cache sizeas well as the cache update bandwidth requirements are the highest atthis point. Due to reduced search window sizes for macroblocks near theleftmost and rightmost sides of the row, the caching and cache updatebandwidth requirements are reduced on the average when the motionestimation process is moving from one macroblock row to the next.Therefore, the cache size and the cache update bandwidth requirementscan be optimized based on only the search window size itself.

In addition, a maximum offset vector can be found with the determinedset of local motion vectors for a picture to be coded. The maximumoffset vector may be the maximum of absolute values of the horizontaland vertical components from the set of local motion vectors. Combiningmaximum offset vector and the search window size, the maximum possiblemotion vector size is determined and therefore a corresponding VLC tablecan be selected for coding of motion vectors for the picture. In thiscase, the selection of VLC tables which are optimized for differentmaximum possible motion vectors can be made adaptive according to theamount of motion from picture to picture.

A picture sequence encoder according to an embodiment of the presentinvention encodes each input picture by determining its picture codingtype (I-, P-, or B-picture), obtaining macroblocks from the picture,subjecting macroblocks of P-picture or B-picture to a motion vectordetection process (frame and/or field, forward and/or backward) using alocal motion estimator, performing necessary motion compensation(predicted or interpolated) using the detected motion vectors,subjecting all macroblocks to a transform coder followed by astatistical coder. The local motion estimator is updated with motionvectors from past processed pictures by the motion vector detector. Themotion vectors are used to generate a local motion vector for each rowof macroblocks in a new picture to be coded. Generated local motionvectors are used to offset search windows of all macroblocks in thecorresponding macroblock row.

Embodiments of the present invention are able to provide an improvedpicture sequence encoding method or apparatus containing a motionestimator with an expanded search range and a minimized search window.Further, embodiments of the invention can provide an apparatus forencoding a picture sequence which includes a motion estimator withoptimized search window cache size and frame buffer memory bandwidthrequirements. The embodiments of the invention described hereintherefore enable an efficient method for motion vectors coding.

BRIEF DESCRIPTION OF THE DRAWINGS

The invention is described in greater detail hereinafter, by way ofexample only, through the following description of preferred embodimentsthereof and with reference to the accompanying drawings, wherein:

FIG. 1 is a functional block diagram of a video encoder with a localmotion estimator according to one embodiment of the present invention;

FIG. 2 illustrates forward and backward motion vector detection forB-pictures and P-picture according to the present invention;

FIG. 3 illustrates how a search window is defined by a local notionvector within a reference picture according to the present invention;and

FIG. 4 shows a block diagram of a circuit for implementing the motionvector detector and local motion estimator as part of a moving picturesencoding system apparatus according to an embodiment of the presentinvention.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

A block diagram of a picture sequence encoder according to a preferredembodiment of the present invention is illustrated in FIG. 1. A movingpictures sequence, which may be in the form of video signals, is inputto a frame buffer (A) 101 for re-ordering and processing requirements(eg. raster to macroblock conversion). The moving pictures sequence maybe pre-processed before inputting. Useful pre-processing techniques mayinclude noise reduction, inverse telecine, and chroma subsampling.

A picture coding type (I, P, or B-picture) is determined using knownmethods according to application needs for each picture in the inputpicture sequence. An I-picture is an intra-coded picture used mainly forrandom access or scene update, a P-picture uses forward motionpredictive coding with reference to a previously coded I or P-picture(anchor picture), and a B-picture uses forward and backward motionpredictive/interpolative coding with reference to previously coded Iand/or P-pictures. An input pictures sequence may be either a field orframe structured sequence coming from an interlaced or progressivesource.

Macroblocks containing blocks of pixel values are derived from a pictureto be coded from picture data stored in the frame buffer (A) 101. Themacroblocks are derived on a row by row basis starting from the leftmostmacroblock to the rightmost macroblock, and the top row to the bottomrow. Macroblocks belonging to an I-picture are passed directly to atransform coder 105, whilst macroblocks belonging to a P-picture orB-picture are passed to a motion vector detector 102. It is alsopossible to subject macroblocks belonging to an I-picture to the motionvector detector 102 for generation of error concealment motion vectorssuch as defined in the MPEG 2 standard.

All necessary motion vectors, for example the frame and/or field,forward and/or backward, and 16×16/16×8/8×8 motion vectors, of eachmacroblock are detected by the motion vector detector 102 by matchingthe macroblock to candidate blocks obtained from a search windowobtained from a reference picture stored in a frame buffer (B) 103.Different matching methods such as the exhaustive search method, thelogarithmic search method, multi-steps or hierarchical search method,and search window sizes may be utilized in the motion vector detector102 depending on application as well as implementation needs. Matchingmethods may also be implemented in various pixel resolutions for exampleinteger, half pel or quarter pel resolution. The matching criterion maybe based on minimum of absolute errors, square errors, or other suitabledistortion functions. In addition, methods of checking neighbouringmacroblock motion vector correlation may be applied. Details of variousdescribed matching methods and matching criterion which can be utilisedin conjunction with embodiments of the present invention are well knownor will be readily apparent to one skilled in the art.

The motion vector detector 102 is coupled to a motion compensationprocessor 104. In the motion compensation process 104, a macroblockcoding mode which can be intra-coded, frame/field forward/backwardpredicted, or frame/field interpolated is first decided for eachmacroblock based on the detected motion vectors from the motion vectordetector 102. Any necessary prediction errors are then generated basedon the decided macroblock coding mode. An example macroblock coding modedecision method may be found in the MPEG2 Test Model 5 specification.

Resultant macroblocks from the motion compensation process 104 aresubjected to a transform coder 105 which exploits correlation withineach macroblock and also its psycho-visual effects. Examples of populartransform coders may be found in the MPEG1, MPEG2, H.261, and H.263standards. One embodiment of a transform coder 105 according to theMPEG2 Test Model 5 includes discrete cosine transformation (DCT), aquantizer, rate controller with adaptive quantization, inversequantizer, and inverse DCT. The transform coder 105 produces transformedand quantized coefficients for each macroblock which are then subjectedto a statistical coder 106. In addition, the transformed and quantizedcoefficients are inverse quantized and inverse transformed by thetransform coder 105 to produce reconstructed macroblocks. Before storingthe reconstructed macroblocks to the frame buffer (B) 103 for futurereference, any necessary inverse of motion compensation is provided toeach reconstructed macroblock by the motion compensation process 104.Reference pictures are formed by the reconstructed macroblocks for usein the motion vector detector 102 and motion compensation process 104.In some applications or coding instances, input pictures can be takendirectly as reference pictures for motion vector detector 102.

The statistical coder 106 exploits all statistical redundancies in thereceived data, and multiplexes the results to produce the finalcompressed output bitstream. As an example in the MPEG2 Test Model 5,the statistical coder 106 provides the zig-zag scanning and run-lengthencoding of the transformed and quantized coefficients, differentialcoding of the utilized motion vectors, and multiplexing of all resultsand necessary side information (eg.sequence/GOP/picture/slice/macroblock layer header information, picturecoding types, macroblock coding modes, etc). The statistical coder 106utilizes variable length codes (VLC) from VLC tables 110.

A local motion estimator 107 determines a local motion vector for eachrow of macroblocks from an input picture. In an embodiment of the localmotion estimator 107, motion vectors from a same macroblock row of apicture as detected by the motion vector detector 102 are averaged togenerate the local motion vector for the corresponding macroblock row ofa new input picture. Alternatively, the median motion vector or the mostcommon vector may be selected, instead of the average, to be outputlocal motion vector. Further methods of generating the local motionvector of each macroblock row according to the present invention arepossible with motion vectors from neighbouring (top or bottom oradditionally neighbour picture) macroblock rows, or with independent rowmotion detectors; however, there may be little or no implementationadvantage for doing so. Each generated local motion vector may benormalized according to the picture distances involved.

FIG. 2 illustrates as an example how local motion vectors (MV) can begenerated using results of previous forward and/or backward motionvector detection according to the present invention. In this example,two B-pictures 202 and 203 (B1 and B2 respectively) are in between twoanchor I or P-pictures 201 and 204. The pictures are shown in displayorder representing a small part of an input picture sequence. Forward MVdetection is performed for picture 202 (B1), 203 (B2), and 204 (P)represented by B1-Forward 206, B2-Forward 207, and P-Forward 208respectively. Similarly, backward MV detection is performed for picture202 (B1) and 203 (B2), and forward MV detection for picture 201 (I/P)with respect to a previous reference picture which is represented byPrevious IP-Forward 216. Macroblock rows 211, 212, 213, and 214represent macroblocks rows of the same vertical position or row numberin pictures 201, 202, 203, 204 respectively.

It is preferable that a local MV to be used for future MV detection isgenerated by motion vectors from a very nearby picture. As an example, alocal MV for use in B2-Forward 207 of macroblock row 213 may begenerated by motion vectors resulting from B-Forward 206 for row 212.With reference to FIG. 2, the following table summarizes the selectionof motion vectors for local MV generation as one out of many possibleembodiments of the local motion estimator according to the presentinvention.

with Local MV Local MV for use in: generated by MVS resulted from:B1-Forward 206 Previous 1/P-Forward 216 or Previous B2-Backward 215B2-Forward 207 B1-Forward 206 P-Forward 208 B2-Forward 207 B2-Backward209 B2-Forward 207 or P-Forward 208 B1-Backward 210 B2-Backward 209 orB1-Forward 206

The resulting local motion vectors are stored in a local MV storage 108illustrated in FIG. 1. When they are available, the local motion vectorsare retrieved by the motion vector detector 102 to offset search windowsof the corresponding macroblock rows. An optional maximum search rangedetector 109 may be used according to the present invention to determinethe maximum horizontal and vertical search ranges of all motion vectorsof a picture such that optimal VLCs can be used from the VLC tables 110for coding of motion vectors in the statistical coder 106. The maximumsearch range, independently defined for horizontal and vertical motion,is the maximum range of all local motion vectors for a picture plus themaximum range of the search window for the picture. With the maximumsearch range detector 109, shorter VLCs or lower bitrate can be used forcoding of motion vectors for a sequence of scenes with little motion,and the VLCs and VLC tables are adaptively extended when motion withinthe sequence or scenes become larger. The maximum search rangeinformation may be coded or transmitted at the picture layer. Methods ofVLC coding for motion vectors may be found in the MPEG2 standard.

In FIG. 3, the procedure for determination of a search window using alocal MV is illustrated. A search window for a current macroblock (MB)to be coded is determined from a reference picture 301 by firstdetermining the position of a co-sited MB 302 on the reference picture301. The position is then offset by a local motion vector 303 generatedfor the macroblock row where the current MV belongs to a new offset MBposition 304 as illustrated. Finally, the horizontal and vertical searchranges are included centred around the offset MB position 304 to formthe search window 305 for the current MB. The search window 305 is thenused for motion vector detection for the current MB.

FIG. 4 shows a block diagram of a circuit which can be employed forimplementing the motion vector detector and local motion estimator aspart of a moving pictures encoding system apparatus according to anembodiment of the present invention. Typically the input picture andreference picture are stored in a large frame buffer 405 which may beimplemented using DRAM (dynamic random access memory). A controller 401,which can be a microprocessor, a digital signal processor (DSP), or afixed function sequencer, is used to control a DMA (direct memory accesscontroller) 404 for accessing the frame buffer 405. Instruction codesneeded for the controller 401 can be stored in an instruction ROM (readonly memory) 402.

A current MB to be coded is determined and loaded into a search engine407 by the controller 401 and DMA 404. The controller then obtains apreviously determined local motion vector for the correspondingmacroblock row from data in a RAM 403. Using the determined local motionvector, the controller defines a search window and transfers thecorresponding data from a reference picture stored in the frame buffer405 to a search window cache 406 using the DMA 404. Given that one localmotion vector is used for the whole macroblock row and that the searchwindow size is fixed according to application or implementation needs,for subsequent MBs only a fraction of the defined search window must beloaded into the search window cache 406. The rest of the defined searchwindow overlaps the search window of the previous MB and therefore isalready stored in the search window cache 406.

With the current MB, the search engine 407 performs motion vectordetection based on the search window data in the search window cache406. The search engine 407 may be implemented to perform specific searchmethods such as the exhaustive search method or themulti-steps/multi-resolution hierarchical search methods, or specificsearch criterion such as using minimum sum of square errors or absoluteerrors. A systolic array processor architecture may be used in thesearch engine 407 to the meet the computation power requirements. Thesearch engine 407 provides as output all detected motion vectors to thecontroller 401. In addition, the results of search criterion computation(minimum square errors, absolute errors, etc) may be provided formacroblock coding mode decision processes. At the end of a row, thecontroller 401 determines a local motion vector using the output motionvectors for each macroblock row and stores the local motion vector intodata RAM 403 for future use.

It will be appreciated from the foregoing description that embodimentsof the present invention provide an improved method and apparatus formotion vector detection. A local motion estimator is used to betterpredict picture to picture motion which consists of not just translationmotion, but also zoom, sheer, or split screen motion. The betterprediction or picture to picture motion allows smaller search windows tobe used to calculate individual macroblock motion vectors, and thereforeenables a reduction of computation load and implementation complexity.With a fixed local motion vector (fixed offset) for each macroblock row,the search window cache size can be minimized according to only thesearch window size. Furthermore, the updating of the search window cacheis also minimized and hence a reduction of memory access bandwidth.These results provide additional reduction in implementation complexity.

The present invention optionally allows maximum horizontal and verticalmotion search ranges to be adaptively determined using the local motionvectors. This method provides an efficient way of coding motion vectorsusing variable length codes. Sequences or scenes with little motion arebetter coded with motion vector bitrate reduction, whilst on the otherhand, motion vector bitrate is increased to handle larger motion withinsequence or scenes.

The foregoing detailed description of the embodiments of the presentinvention has been presented by way of example only, and is not intendedto be considered limiting to the invention as defined in the claimsappended hereto.

1. A method for determining motion vectors for encoding picture data ina sequence of pictures wherein data representing a picture in thesequence is arranged in a plurality of adjacent data blocks; the methodcomprising the steps of: (a) encoding a first picture in the sequencewith motion vectors for the data blocks in the first picture; (b)generating respective local motion vectors for groups of adjacent datablocks in the first picture, wherein a local motion vector for eachgroup of data blocks is generated according to the individual motionvectors of the data blocks in the group; (c) selecting a data block ofan object picture to be coded; (d) determining a window of search datafrom a reference picture on the basis of the corresponding position ofthe selected data block and the local motion vector which corresponds tothe selected data block; (e) comparing the selected data block with thesearch data from the reference picture in order to determine a motionvector for the selected data block; and repeating the steps (c), (d) and(e) for each data block in a group of adjacent data blocks in the objectpicture, wherein the step (e) involves storing the window of search datain a cache memory, and wherein each successive iteration of the step (e)after an initial operation requires only a fraction of the search datawindow to be cached.
 2. A method as claimed in claim 1, including a step(f) of generating a local motion vector from the motion vectors of thedata blocks in said group of data blocks in the object picture.
 3. Amethod as claimed in claim 1 or 2, wherein each said group of adjacentdata blocks comprises a row of macroblocks from the respective picture.4. A method as claimed in claim 1, wherein the window of search data isof fixed size for a group of data blocks.
 5. A method as claimed inclaim 2, including repeating the steps (c) through (f) for each datablock and group of data blocks in the object picture.
 6. A method asclaimed in claim 1 or 2, wherein the local motion vector for a group ofdata blocks comprises an average of the motion vectors for the datablocks in the group.
 7. A method as claimed in claim 1 or 2, wherein thelocal motion vector for a group of data blocks comprises a median of themotion vectors for the data blocks in the group.
 8. A method as claimedin claim 1 or 2, wherein the local motion vector for a group of datablocks comprises a most common value of the motion vectors for the datablocks in the group.
 9. A moving pictures encoder for encoding asequence of pictures, the encoder comprising: a motion vector detectorcoupled to receive picture data from the sequence of pictures fordetermining respective motion vectors for data blocks in a picture ofthe picture sequence, wherein each motion vector is determined using acomparison of the data block with search window data from a referencepicture; a local motion estimator coupled to the motion vector detectorfor determining and storing a local motion vector based on motionvectors from a group of adjacent data blocks from a picture; and whereinthe motion vector detector utilizes stored local motion vectors from apreviously coded picture to determine the search window data; atransform coder and a statistical coder which uses variable length codetables for encoding the motion vectors; and a maximum vector analyzerfor determining a maximum vector magnitude from the local motion vectorsfor a picture and selecting a variable length coding table for use bythe statistical coder on the basis of the maximum vector magnitude. 10.A moving pictures encoder as claimed in claim 9, wherein the referencepicture is stored in a frame buffer memory, the search window data in asearch window cache memory, and wherein the motion vector detector iscoupled to control transfer of data from the frame buffer memory to thesearch window cache memory on the basis of stored local motion vectors.11. A moving pictures encoder as claimed in claim 10, wherein a group ofadjacent data blocks utilized by the local motion estimator to determinea local motion vector comprises a row of macroblocks from a picture. 12.A method for determining motion vectors for encoding picture data in asequence of pictures wherein data representing a picture in the sequenceis arranged in a plurality of adjacent data blocks; the methodcomprising the steps of: (a) encoding a first picture in the sequencewith motion vectors for the data blocks in the first picture; (b)generating respective local motion vectors for groups of adjacent datablocks in the first picture, wherein a local motion vector for eachgroup of data blocks is generated according to the individual motionvectors of the data blocks in the group; (c) selecting a data block ofan object picture to be coded; (d) determining a window of search datafrom a reference picture on the basis of the corresponding position ofthe selected data block and the local motion vector which corresponds tothe selected data block; (e) comparing the selected data block with thesearch data from the reference picture in order to determine a motionvector for the selected data block; repeating the steps (c) through (e)for each data block and group of data blocks in the object picture;determining a maximum offset vector based on the maximum of absolutevalues of horizontal and vertical components of the local motion vectorsfor the object picture; and selecting a variable length coding table forcoding the data block motion vectors for the object picture based on themaximum offset vector.
 13. A method as claimed in claim 12, including astep (f) of generating a local motion vector from the motion vectors ofthe data blocks in said group of data blocks in the object picture,wherein the repeating step includes repeating steps (c) through (f) foreach data block and group of data blocks in the object picture.
 14. Amethod for determining motion vectors for encoding picture data in asequence of pictures wherein data representing a picture in the sequenceis arranged in a plurality of adjacent data blocks; the methodcomprising the steps of: (a) encoding a first picture in the sequencewith motion vectors for the data blocks in the first picture; (b)generating respective local motion vectors for groups of adjacent datablocks in the first picture, wherein a local motion vector for eachgroup of data blocks is generated according to the individual motionvectors of the data blocks in the group; (c) selecting a data block ofan object picture to be coded; (d) determining a window of search datafrom a reference picture on the basis of the corresponding position ofthe selected data block and the local motion vector which corresponds tothe selected data block; (e) comparing the selected data block with thesearch data from the reference picture in order to determine a motionvector for the selected data block; repeating the steps (c) through (e)for each data block and group of data blocks in the object picture,wherein the local motion vectors generated from the object picture aresubsequently used for performing step (d) during coding of a successivepicture in the sequence of pictures.
 15. A method as claimed in claim14, including a step (f) of generating a local motion vector from themotion vectors of the data blocks in said group of data blocks in theobject picture, wherein the repeating step includes repeating steps (c)through (f) for each data block and group of data blocks in the objectpicture.
 16. A coding apparatus for encoding picture data in a sequenceof pictures wherein data representing a picture in the sequence isarranged in a plurality of adjacent data blocks and motion vectors aregenerated for the data blocks of a picture in the sequence, the codingapparatus comprising: a local motion estimator for generating respectivelocal motion vectors for groups of adjacent data blocks in the objectpicture, wherein a local motion vector for each group of data blocks isgenerated according to individual motion vectors of the data blocks inthe group; a local motion vector storage memory for storing the localmotion vectors for the object picture; and a motion vector detector forgenerating motion vectors for data blocks in an object picture, themotion vector detector including a search window cache for caching aselected portion of a reference picture and a search engine forcomparing data blocks of the object picture with the search window cachecontents, wherein the contents of the search window cache are selectedaccording to a local motion vector retrieved from the local motionvector storage memory from a previously coded picture in the picturesequence; a transform coder and a statistical coder which uses variablelength code tables for encoding the motion vectors; and a maximum vectoranalyzer for determining a maximum vector magnitude from the localmotion vectors for a picture and selecting a variable length codingtable for use by the statistical coder on the basis of the maximumvector magnitude.
 17. A coding apparatus as claimed in claim 16, whereinthe local motion estimator generates a local motion vector for each rowof macroblocks in a picture.
 18. A moving pictures encoder for encodinga sequence of pictures, wherein data representing a picture in thesequence is arranged in a plurality of adjacent data blocks; the encodercomprising: encoding means for encoding a first picture in the sequencewith motion vectors for the data blocks in the first picture; generatingmeans for generating respective local motion vectors for groups ofadjacent data blocks in the first picture, wherein a local motion vectorfor each group of data blocks is generated according to the individualmotion vectors of the data blocks in the group; selecting means forsuccessively selecting each data block of a group of data blocks of anobject picture to be coded; determining means for successivelydetermining, for each selected data block in the group of data blocks, awindow of search data from a reference picture based on a correspondingposition of the selected data block and the local motion vector whichcorresponds to the selected data block; comparing means for successivelycomparing, for each selected data block in the group of data blocks, theselected data block with the search data from the reference picture inorder to determine a motion vector for the selected data block; and acache memory that stores the window of search data, wherein eachsuccessive comparison by the comparing means after an initial operationrequires only a fraction of the search data window to be cached in thecache memory.
 19. A moving pictures encoder for encoding a sequence ofpictures, wherein data representing a picture in the sequence isarranged in a plurality of adjacent data blocks; the encoder comprising:encoding means for encoding a first picture in the sequence with motionvectors for the data blocks in the first picture; generating means forgenerating respective local motion vectors for groups of adjacent datablocks in the first picture, wherein a local motion vector for eachgroup of data blocks is generated according to the individual motionvectors of the data blocks in the group; selecting means forsuccessively selecting each data block of a group of data blocks of anobject picture to be coded; determining means for successivelydetermining, for each selected data block in the group of data blocks, awindow of search data from a reference picture based on a correspondingposition of the selected data block and the local motion vector whichcorresponds to the selected data block; comparing means for successivelycomparing, for each selected data block in the group of data blocks, theselected data block with the search data from the reference picture inorder to determine a motion vector for the selected data block; meansfor determining a maximum offset vector based on the maximum of absolutevalues of horizontal and vertical components of the local motion vectorsfor the object picture; and means for selecting a variable length codingtable for coding the data block motion vectors for the object picturebased on the maximum offset vector.
 20. A moving pictures encoder forencoding a sequence of pictures, wherein data representing a picture inthe sequence is arranged in a plurality of adjacent data blocks; theencoder comprising: encoding means for encoding a first picture in thesequence with motion vectors for the data blocks in the first picture;generating means for generating respective local motion vectors forgroups of adjacent data blocks in the first picture, wherein a localmotion vector for each group of data blocks is generated according tothe individual motion vectors of the data blocks in the group; selectingmeans for successively selecting each data block of a group of datablocks of an object picture to be coded; determining means forsuccessively determining, for each selected data block in the group ofdata blocks, a window of search data from a reference picture based on acorresponding position of the selected data block and the local motionvector which corresponds to the selected data block; and comparing meansfor successively comparing, for each selected data block in the group ofdata blocks, the selected data block with the search data from thereference picture in order to determine a motion vector for the selecteddata block; wherein the determining means include means for subsequentlyusing the local motion vectors generated from the object picture todetermine the window of search data during coding of a successivepicture in the sequence of pictures.